{% extends 'sys_templates/public/base.html' %}
{% block head %}
    <style>
        .layui-form-select {
            width: 30%;
        }

        .word-aux {
            font-size: 12px;
            padding: 9px 0 !important;
            line-height: 38px;
            margin-left: 10px;
        }

        .warn {
            color: red
        }
    </style>
{% endblock %}
{% block content %}
    <fieldset class="layui-elem-field layui-field-title site-title">
        <legend><a name="default">{{ title }}</a></legend>
    </fieldset>
    <form class="layui-form">
        {% for foo in form %}
            {% if foo.type!='BooleanField' %}
                <div class="layui-form-item">
                    <label class="layui-form-label">{{ foo.label }}</label>
                    <div class="layui-input-block">{{ foo }}
                        {% if foo.name=='project_name' %}
                            <span class="word-aux"><span class="warn">*</span> 如：网易_娱乐新闻</span>
                        {% elif foo.name=='URL_create' %}
                            <span class="word-aux"><span class="warn">*</span> 注：勾选批量生成(有效) / 分页
                                <span class="warn">{$ID}</span>&nbsp;示例格式：http://xuks.top/list.php?page={$ID}</span>
                        {% elif foo.name=='goal_url' %}
                            <span class="word-aux"><span class="warn">*</span> 示例格式：http://www.xuks.top [ <span
                                    class="warn">注</span>:图片为相对地址时填写 用于拼接绝对地址 ]</span>
                            {% elif foo.name=='fixed_URL' %}
                            <span class="word-aux"><span class="warn">*</span>格式：输入一个网址后按回车，再输入下一个 【一行一个URL】</span>
                        {% elif foo.name=='create_range' %}
                            <span class="word-aux"><span class="warn">*</span> 例:1|99</span>
                        {% elif foo.name=='img_save_path' %}
                            <span class="word-aux"><span class="warn">*</span> 注:后面必须带"/"结束(不推荐修改)</span>
                        {% elif foo.name=='restrictive' %}
                            <span class="word-aux"><span class="warn">*</span> 提示:0 为不限制(采集所有)</span>
                        {% endif %}
                    </div>
                </div>
            {% endif %}
            {% if foo.name=='img_save_path' %}
                <div class="layui-form-item">
                    <label class="layui-form-label">标签过滤</label>
                    <div class="layui-input-block">
                        {% for foo in form %}
                            {% if (foo.name!='create_is_range' and foo.name!='img_is_save' and foo.name!='url_is_desc' and foo.name!='tim_acquisition' and foo.name!='url_relative' and foo.name!='img_relative')and foo.type=='BooleanField' %}
                                {{ foo }}{% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
            {% if foo.name=='description_rule' %}
                <div class="layui-form-item">
                    <label class="layui-form-label">其他属性</label>
                    <div class="layui-input-block">
                        {% for foo in form %}
                            {% if foo.name=='create_is_range' or foo.name=='img_is_save' or foo.name=='url_is_desc' or foo.name=='tim_acquisition' or foo.name=='url_relative' or foo.name=='img_relative' %}
                                {{ foo }}{% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
        {% endfor %}
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <a class="layui-btn" href="javascript:;" onclick="submit_post()">提交保存</a>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>
{% endblock %}
